package com.mantru.iotpot.job;

/**
 * 任务中用到的寄存器结点类
 */
public class JobRegister {
    //结点类型，0开始时固定执行的指令、1结束时固定执行的指令、2常规指令
    public int node_type;
    //寄存器起始地址
    public int starting_address;
    //寄存器在任务未结束或未暂停或未停止前的值
    public int current_value;
    //该寄存器在任务结束、暂停、停止时是否需要恢复原始值，true是需要
    public boolean is_need_init;
    //当is_need_init=true时的原始值
    public int init_value;
    //下面的变量详见JobNode类定义
    public int slave, function_code, quantity_of_x;

    public JobRegister(int node_type, int slave, int function_code, int starting_address, int quantity_of_x, int output_value, boolean is_need_init, int init_value){
        this.node_type = node_type;
        this.slave = slave;
        this.function_code = function_code;
        this.starting_address = starting_address;
        this.quantity_of_x = quantity_of_x;
        this.current_value = output_value;
        this.is_need_init = is_need_init;
        this.init_value = init_value;
    }


}


